<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js" type="application/javascript"></script>
</head>
<body>
<div id="app">
    <my-component v-for="item in items" v-bind:course="item"></my-component>
</div>

<script>
    Vue.component('my-component',{
        props: ["course"],
        template: '<p>{{course}}</p>'
    })
    var vm  = new Vue({
        el:"#app",
        data:{
            "items":["Java", "大数据", "云计算"]
        }
    });
</script>
</body>
</html>